<template>
    <div>
        <h1>C component {{$attrs}}----{{myname}}--</h1>
        <button @click="handle">c按钮</button>
    </div>
</template>

<script>
import {mapstate} from "vuex";
import MyEvent from "./MyEvent.js";
    export default{
        inject:["myname"],
        name: "CompTextc",
        data(){
            return{

            }
        },
        components:{
            ...mapstate(["wname"])
        },
        methods:{
           handle(){
               MyEvent.$emit("cHandle","C里的数据");
           }
        }
       
    }
</script>

<style>
</style>